// 用户列表查询参数接口
export interface UserListQueryParams {
  name?: string;
  systemRole?: number;
  status?: number;
  page?: number;
  pageSize?: number;
  sortBy?: 'createTime' | 'updateTime';
  sortOrder?: 'asc' | 'desc';
}

// 创建用户请求接口
export interface CreateUserRequest {
  name: string;
  profileId: string;
  email: string;
  systemRole: number;
  phoneNumber: string;
  status: number;
}

// 创建用户响应数据接口
export interface CreateUserResponseData {
  id: string;
  name: string;
  profileId: string;
  username: string;
  email: string;
  phone: string;
  role: string;
  status: string;
  createTime: string;
  lastLoginTime: string;
}

// 创建用户响应接口
export interface CreateUserResponse {
  code: number;
  data?: CreateUserResponseData;
  message?: string;
}

// 获取单个用户响应数据接口
export interface GetUserResponseData {
  id: number;
  name: string;
  username: string;
  email?: string;
  phone?: string;  
  role?: number;   
  status?: number;
  createTime?: string;
  avatar?: string;
}

// 获取单个用户响应接口
export interface GetUserResponse {
  code: number;
  message?: string;
  data?: GetUserResponseData;
}

// 更新用户请求接口
export interface UpdateUserRequest {
  id: string;
  name?: string;
  username?: string;
  email?: string;
  phoneNumber?: string;  
  profileId?: string;
  systemRole?: string;  
  status?: string;
}


// 更新用户响应接口
export interface UpdateUserResponse {
  code: number;
  message?: string;
  data?: Record<string, never>;
}

// 用户列表项接口
export interface UserListItem {
  id: number;
  name: string;
  username: string;
  profileId: string;
  email: string;
  phone: string;
  role: number;
  status: number;
  createTime: string;
}

// 用户列表响应接口
export interface UserListResponse {
  code: number;
  data?: {
    records: UserListItem[];
    total: number;
  };
  message?: string;
}

// 通用管理员响应接口
export interface AdminApiResponse<T = unknown> {
  code: number;
  data?: T;
  msg?: string;
} 

// 删除用户请求参数接口
export interface DeleteUserRequest {
  id: string;
}

// 删除用户响应接口
export interface DeleteUserResponse {
  code: number;
  message?: string;
  data?: Record<string, never>;
}

// 更新状态
export interface UpdateUserStatusResponse {
  code: number;
  message?: string;
  data?: UserListItem;
}

// 用户状态更新参数类型
export interface UpdateUserStatusParams {
  id: string;
  status: number;
}